package com.chaoyi.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.chaoyi.dao.mysql.ModelInfoMapper;
import com.chaoyi.model.ModelInfo;
import com.chaoyi.service.ModelInfoService;

@Service
public class ModelInfoServiceImpl implements ModelInfoService{
	@Resource
	private ModelInfoMapper modelInfoMapper;
	
	@Override
	public List<ModelInfo> findList(String offset, String limit) {
		return modelInfoMapper.findList(offset,limit);
	}

	@Override
	public int checkModelInfoName(String modelName, int modelId) {
		return modelInfoMapper.checkModelInfoName(modelName, modelId);
	}

	@Override
	public int saveModelInfoParent(ModelInfo modelInfo) {
		return modelInfoMapper.saveModelInfoParent(modelInfo);
	}

	@Override
	public ModelInfo findModel(int modelId) {
		return modelInfoMapper.findModel(modelId);
	}

	@Override
	public int updateModelInfoParent(ModelInfo modelInfo) {
		return modelInfoMapper.updateModelInfoParent(modelInfo);
	}

//	@Override
//	public int saveDictionaryChile(Dictionary dictionary) {
//		return dictionaryMapper.saveDictionaryChile(dictionary);
//	}

	@Override
	public List<ModelInfo> findChildrenList(int parentId) {
		return modelInfoMapper.findChildrenList(parentId);
	}

	@Override
	public List<ModelInfo> findAllModelInfo() {
		return modelInfoMapper.findAllModelInfo();
	}
}
